<?
if($_GET[mid]==29 or $_GET[mid]==30 )
{

}
else
{
?>
    <div class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="sidebar-search">
                  <p>Welcome, <strong><? echo $s_name;?></strong>!</p> 
                </li>
			   <?
				$mid=$_GET['mid'];
				$user_id=$_SESSION['SESS_MEMBER_ID'];
				
				$sql6 = "SELECT * FROM menu,link where menu.parent='$mid' and link.mid=menu.mid and link.user_id='$user_id' order by rank";
				
				//$result1 = mysql_query("SELECT * FROM menu,link where menu.parent='$mid' and link.mid=menu.mid and link.user_id='$user_id' order by rank"); 
				
				$result1 = $dbcn->select($sql6);
				
				for ($k = 0; $k < count($result1); $k++) 
				{
				$row1 = array();
                $row1 = $result1[$k];
				
					$smid=$row1['mid'];
					$title=$row1['title'];
					$path=$row1['path']."&mid=".$mid."&smid=".$smid;
					
					//$in_sub=mysql_query("SELECT * FROM menu,link where menu.parent='$smid' and link.mid=menu.mid and link.user_id='$user_id' order by rank");
					
					$in_sub ="SELECT * FROM menu,link where menu.parent='$smid' and link.mid=menu.mid and link.user_id='$user_id' order by rank";
					//$result1_in_sub = $dbcn->select($in_sub);
					$numb = $dbcn->chknum($in_sub);
					
					//$numb=mysql_num_rows($in_sub);
					
							if($numb==0)
							{
								$cls="submenu-link1";
							}
							else
							{
								$cls="submenu-link";
							}
				?>	

						
				<li class="submenu-item1">
          			<a class="" href="<? echo $path; ?>"><i class="fa fa-dashboard fa-fw"></i><? echo $title; ?></a>
          		</li>
				<?}?>
            </ul>
                    
        </div>
              
    </div>
  <?}?>
</nav>
